import request from '@/utils/request'
import {
  renderUrl
} from '../utils'

const headers = {
  'Content-Type': 'application/json'
}

export function edit(params) {
  return request({
    url: '/admin/productComment/update',
    method: 'POST',
    params
  })
}

export function del(data) {
  return request({
    url: '/admin/productComment/delete',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function getProductCommentDetail(params) {
  return request({
    url: '/admin/productComment/selectById',
    method: 'POST',
    params
  })
}

export function addProductCommentReplay(data) {
  return request({
    url: '/admin/productCommentreplay/add',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export function delProductCommentReplay(data) {
  return request({
    url: '/admin/productCommentreplay/delete',
    method: 'POST',
    data: JSON.stringify(data),
    headers
  })
}

export default {
  del, edit
}
